package org.xx.sipahi.controllers;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import org.xx.armory.commons.ForLogging;

@Controller
@RequestMapping
public class HomeController {
    @ForLogging
    private final Logger logger = LoggerFactory.getLogger(HomeController.class);

    @GetMapping({"/", "/index"})
    public ModelAndView index() {
        final ModelAndView ret = new ModelAndView("/index");
        ret.addObject("javaVendor", System.getProperty("java.vendor"));
        ret.addObject("javaVersion", System.getProperty("java.version"));
        ret.addObject("osName", System.getProperty("os.name"));
        return ret;
    }
}
